]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
9482b620
MP
12015-06-04 Marek Polacek <polacek@redhat.com>
2
3 PR c/66341
4 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5 it is a lvalue.
6
bc51ace3
PK
72015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8
9 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
10 Warn for empty struct.
11 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
12
ea5b45b6
AT
132015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
14
15 * c-decl.c (start_function): Call plugin before parsing.
16 (finish_function): Call plugin after parsing.
17
c2d47482
PK
182015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19
20 PR c/49551
21 * c-decl.c (merge_decls): Merge DECL_COMMON.
22
a95492ab
JW
232015-05-22 Jim Wilson <jim.wilson@linaro.org>
24
25 * Make-lang.in (check_gcc_pallelize): Define.
26
fd5c817a
MP
272015-05-22 Marek Polacek <polacek@redhat.com>
28
29 PR c/47043
30 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
31 attributes.
32
c7b70a3c
MP
332015-05-21 Marek Polacek <polacek@redhat.com>
34
35 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
36 DECL_BUILT_IN.
37
21b634ae
MP
382015-05-20 Marek Polacek <polacek@redhat.com>
39
40 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
41 * c-typeck.c: Likewise.
42
296a8c2f
MP
432015-05-19 Marek Polacek <polacek@redhat.com>
44
45 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
46
41b37d5e
JJ
472015-05-19 Jakub Jelinek <jakub@redhat.com>
48
49 PR middle-end/66199
50 * c-parser.c (c_parser_omp_for_loop): Don't add
51 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
52 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
53 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
54 constructs.
55
fab27f52
MM
562015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
57
58 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 59 swaps.
fab27f52 60
40de31cf
MLI
612015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
62
63 PR fortran/44054
64 * c-objc-common.c (c_tree_printer): Replace locus pointer with
65 accessor function.
66
3aa3c9fc
MP
672015-05-14 Marek Polacek <polacek@redhat.com>
68
69 PR c/66066
70 PR c/66127
71 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
72 rather than with 0.
73
c3388e62
DM
742015-05-12 David Malcolm <dmalcolm@redhat.com>
75
76 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
77 to add a call to warn_for_misleading_indentation.
78 (c_parser_else_body): Likewise, adding param "else_loc".
79 (c_parser_if_statement): Check for misleading indentation.
80 (c_parser_while_statement): Likewise.
81 (c_parser_for_statement): Likewise.
82
755e528f
MP
832015-05-08 Marek Polacek <polacek@redhat.com>
84
85 PR c/64918
86 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
87 (output_init_element): Likewise.
88
0173bd2a
MP
892015-05-07 Marek Polacek <polacek@redhat.com>
90
91 PR c/65179
92 * c-typeck.c (build_binary_op): Warn when left shifting a negative
93 value.
94
9babc352
MP
952015-04-30 Marek Polacek <polacek@redhat.com>
96
97 * c-typeck.c (set_init_label): Call error_at instead of error and
98 pass LOC to it.
99
ac9f18db
MP
100 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
101 the type of a decl.
102
ec3fba51
MP
103 * c-typeck.c (c_build_va_arg): Clarify the error message.
104
b811915d
TS
1052015-04-29 Thomas Schwinge <thomas@codesourcery.com>
106
107 * c-parser.c (c_parser_oacc_enter_exit_data): Use
108 OMP_STANDALONE_CLAUSES.
109
f3075008
MP
1102015-04-28 Marek Polacek <polacek@redhat.com>
111
112 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
113
4e81b788
MP
1142015-04-28 Marek Polacek <polacek@redhat.com>
115
116 PR c/65901
117 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
118
6c1db78e
MP
1192015-04-25 Marek Polacek <polacek@redhat.com>
120
121 PR c/52085
122 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
123 attribute.
124
5c4abbb8
MP
1252015-04-23 Marek Polacek <polacek@redhat.com>
126
127 PR c/65345
128 * c-decl.c (set_labels_context_r): New function.
129 (store_parm_decls): Call it via walk_tree_without_duplicates.
130 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
131 instead of create_tmp_var. Build TARGET_EXPR instead of
132 COMPOUND_EXPR.
133 (build_atomic_assign): Use create_tmp_var_raw instead of
134 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
135
06aca1d5
IV
1362015-04-20 Ilya Verbin <ilya.verbin@intel.com>
137
138 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
139 (c_parser_omp_target_update): Add missed %> to error_at ().
140
8fba1830
BRF
1412015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
142
143 PR target/55143
144 * c-decl.c (c_default_pointer_mode): Remove definition.
145 * c-tree.h (c_default_pointer_mode): Remove declaration.
146
62021f64
TB
1472015-03-27 Tobias Burnus <burnus@net-b.de>
148
149 PR c/65586
150 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
151 error out.
152 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
153 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
154 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
155
9b65e171
JJ
1562015-03-19 Jakub Jelinek <jakub@redhat.com>
157
158 * c-decl.c (c_decl_attributes): Also add "omp declare target"
159 attribute for DECL_EXTERNAL VAR_DECLs.
160
17958621
JJ
1612015-03-11 Jakub Jelinek <jakub@redhat.com>
162
163 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
164 argument.
165
7ccb1a11
JJ
1662015-03-10 Jakub Jelinek <jakub@redhat.com>
167
168 PR c/65120
169 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
170 before preparing arguments to warn_logical_not_parentheses.
171
01177669
JJ
1722015-03-09 Jakub Jelinek <jakub@redhat.com>
173
174 PR c/65120
175 * c-typeck.c (parser_build_binary_op): Don't warn for
176 !!x == y or !b == y where b is _Bool.
177
802ac282
MP
1782015-03-09 Marek Polacek <polacek@redhat.com>
179
180 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
181 * c-decl.c (grokdeclarator): Likewise.
182 * c-typeck.c (build_binary_op): Likewise.
183
e5165b60
MP
1842015-02-27 Marek Polacek <polacek@redhat.com>
185
186 PR c/65228
187 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
188
065d214c
MP
1892015-02-14 Marek Polacek <polacek@redhat.com>
190
191 PR c/64768
192 * c-decl.c (grokdeclarator): Set the range of a flexible array member
193 declared through a typedef name.
194
e5d9235b
MP
1952015-02-13 Marek Polacek <polacek@redhat.com>
196
197 PR c/65050
198 * c-decl.c (grokdeclarator): Print also the type when giving
199 the error message about array's incomplete element type.
200
fa01ffcc
JJ
2012015-02-11 Jakub Jelinek <jakub@redhat.com>
202
203 PR c/64824
204 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
205 check in the POP macro.
206
c3e38a03
MP
2072015-02-09 Marek Polacek <polacek@redhat.com>
208
209 PR c/64856
210 * c-typeck.c (process_init_element): Don't always wrap
211 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
212 initializing a range of elements.
213
4886ec8e
JJ
2142015-02-04 Jakub Jelinek <jakub@redhat.com>
215
216 PR c/64824
217 PR c/64868
218 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
219
c3e38a03 2202015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
221
222 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
223 processing enum declaration.
224
7b33f0c8
MP
2252015-01-29 Marek Polacek <polacek@redhat.com>
226
227 PR c/64709
228 * c-typeck.c (pop_init_level): If constructor_elements has
229 exactly one element with integer_zerop value, set constructor_zeroinit
230 to 1. Remove braces around warning_init call.
231
dea63e49
JJ
2322015-01-27 Jakub Jelinek <jakub@redhat.com>
233
234 PR c/64766
235 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
236 of FUNCTION_DECLs with error_mark_node.
237
d38f7dce
JJ
2382015-01-26 Jakub Jelinek <jakub@redhat.com>
239
240 PR c/64778
241 * c-typeck.c (convert_arguments): Return -1 if there are
242 error_args, even if we've diagnosed too many arguments.
243
cbf5d0e7
RB
2442015-01-21 Richard Biener <rguenther@suse.de>
245
246 PR middle-end/64313
247 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
248 for builtins the user declared correctly.
249
41dbbb37
TS
2502015-01-15 Thomas Schwinge <thomas@codesourcery.com>
251 Bernd Schmidt <bernds@codesourcery.com>
252 Cesar Philippidis <cesar@codesourcery.com>
253 James Norris <jnorris@codesourcery.com>
254 Jakub Jelinek <jakub@redhat.com>
255 Ilmir Usmanov <i.usmanov@samsung.com>
256
257 * c-parser.c: Include "gomp-constants.h".
258 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
259 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
260 Use OMP_CLAUSE_SET_MAP_KIND.
261 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
262 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
263 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
264 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
265 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
266 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
267 "copyout", "create", "delete", "deviceptr", "gang", "host",
268 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
269 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
270 "present_or_create", "pcreate", "seq", "self", "vector",
271 "vector_length", "wait", "worker".
272 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
273 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
274 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
275 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
276 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
277 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
278 (c_parser_oacc_data_clause_deviceptr)
279 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
280 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
281 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
282 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
283 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
284 (c_parser_oacc_parallel, c_parser_oacc_update)
285 (c_parser_oacc_wait): New functions.
286 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
287 (c_finish_oacc_data): New prototypes.
288 * c-typeck.c: Include "gomp-constants.h".
289 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
290 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
291 OMP_CLAUSE_SET_MAP_KIND.
292 (c_finish_oacc_parallel, c_finish_oacc_kernels)
293 (c_finish_oacc_data): New functions.
294 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
295 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
296 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
297 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
298 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
299 GOMP_MAP_FORCE_DEVICEPTR.
300
adfac8df
JJ
3012015-01-09 Michael Collison <michael.collison@linaro.org>
302
303 * c-array-notation.c: Include hash-set.h, machmode.h,
304 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
305 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
306 * c-aux-info.c: Ditto.
307 * c-convert.c: Ditto.
308 * c-decl.c: Ditto.
309 * c-errors.c: Ditto.
310 * c-lang.c: Dittoxs.
311 * c-objc-common.c: Ditto.
312 * c-parser.c: Ditto.
313 * c-typeck.c: Include hash-set.h, machmode.h,
314 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
315 fold-const.h, wide-int.h, inchash.h, real.h and
316 fixed-value.h due to flattening of tree.h.
317
2cc901dc
MP
3182015-01-07 Marek Polacek <polacek@redhat.com>
319
320 PR c/64417
321 * c-typeck.c (process_init_element): Disallow initialization of
322 a flexible array member with a string constant if the structure
323 is in an array.
324
5624e564
JJ
3252015-01-05 Jakub Jelinek <jakub@redhat.com>
326
e5341100
JJ
327 PR sanitizer/64344
328 * c-typeck.c (convert_for_assignment, c_finish_return): For
329 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
330 types also set in_late_binary_op around convert call.
331 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
332 to integral type casts, if not in_late_binary_op, pass c_fully_fold
333 result on expr as last argument to ubsan_instrument_float_cast,
334 if in_late_binary_op, don't use c_save_expr but save_expr.
335
5624e564
JJ
336 Update copyright years.
337
5bd012f8
MP
3382015-01-05 Marek Polacek <polacek@redhat.com>
339
340 PR c/64423
341 * c-typeck.c (build_array_ref): Pass loc down to
342 warn_array_subscript_with_type_char.
343
768952be
MU
3442014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
345
346 * c-typeck.c: New behavious for pointers to arrays with qualifiers
347 (common-pointer-type): For pointers to arrays take qualifiers from
348 element type.
349 (build_conditional_expr): Add warnings for lost qualifiers.
350 (comp-target-types): Allow pointers to arrays with different qualifiers.
351 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
352 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
353 to PEDWARN_FOR_QUALIFIERS.
354
8f94a8c4
JJ
3552014-12-17 Jakub Jelinek <jakub@redhat.com>
356
357 PR sanitizer/64289
358 * c-convert.c: Include ubsan.h.
359 (convert): For real -> integral casts and
360 -fsanitize=float-cast-overflow don't call convert_to_integer, but
361 instead instrument the float cast directly.
362
b731b390
JJ
3632014-11-29 Jakub Jelinek <jakub@redhat.com>
364
365 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
366 c_finish_stmt_expr): Remove NULL last argument from
367 create_tmp_var_raw and create_tmp_var calls.
368 * c-array-notation.c (fix_builtin_array_notation_fn,
369 build_array_notation_expr, fix_conditional_array_notations_1,
370 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
371
541e35a6
MP
3722014-11-28 Marek Polacek <polacek@redhat.com>
373
374 PR c/63862
375 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
376 convert the right operand to integer type.
377
b286be94
MP
3782014-11-25 Marek Polacek <polacek@redhat.com>
379
380 PR c/63877
381 * c-decl.c (start_function): Disable -Wmissing-declarations warning
382 for inline functions.
383
aa7da51a
JJ
3842014-11-21 Jakub Jelinek <jakub@redhat.com>
385
386 PR target/63764
387 * c-typeck.c (build_array_ref): Adjust
388 convert_vector_to_pointer_for_subscript caller. If it returns true,
389 call non_lvalue_loc on the result.
390
d876207f
RB
3912014-11-11 Richard Biener <rguenther@suse.de>
392
393 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
394 to true.
395
e5e44252
AK
3962014-11-10 Andi Kleen <ak@linux.intel.com>
397
398 PR c/60804
399 * c-parser.c (c_parser_statement_after_labels): Call
400 check_no_cilk.
401 (c_parser_if_statement): Dito.
402 (c_parser_switch_statement): Dito.
403 (c_parser_while_statement): Dito.
404 (c_parser_do_statement): Dito.
405 (c_parser_for_statement): Dito.
406 * c-typeck.c (c_finish_loop): Dito.
407
13c21655
PC
4082014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
409
410 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
411 OPT_Wshift_count_overflow in the warnings.
412
2d51fcef
MP
4132014-10-30 Marek Polacek <polacek@redhat.com>
414
415 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
416 print the stripped version as well, if they're not the same.
417
ef4bddc2
RS
4182014-10-29 Richard Sandiford <richard.sandiford@arm.com>
419
420 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
421 machine_mode.
422
c582198b
AM
4232014-10-28 Andrew MacLeod <amacleod@redhat.com>
424
425 * c-decl.c: Adjust include files.
426 * c-parser.c: Ditto.
427
ddc8de03
PM
4282014-10-27 Phil Muldoon <pmuldoon@redhat.com>
429 Tom Tromey <tromey@redhat.com>
430
431 * c-tree.h (enum c_oracle_request): New.
432 (c_binding_oracle_function): New typedef.
433 (c_binding_oracle, c_pushtag, c_bind): Declare.
434 * c-decl.c (c_binding_oracle): New global.
435 (I_SYMBOL_CHECKED): New macro.
436 (i_symbol_binding): New function.
437 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
438 (I_TAG_CHECKED): New macro.
439 (i_tag_binding): New function.
440 (I_TAG_BINDING, I_TAG_DECL): Redefine.
441 (I_LABEL_CHECKED): New macro.
442 (i_label_binding): New function.
443 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
444 (c_print_identifier): Save and restore c_binding_oracle.
445 (c_pushtag, c_bind): New functions.
446
60393bbc
AM
4472014-10-27 Andrew MacLeod <amacleod@redhat.com>
448
449 * c-typeck.c: Adjust include files.
450
d723bb7c
MLI
4512014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
452
453 PR c++/53061
454 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
455 initialization here...
456 (c_initialize_diagnostics): ... but here. Set defaults after
457 building pretty-printer.
458
1bc5a451
MP
4592014-10-23 Marek Polacek <polacek@redhat.com>
460
461 PR c/63626
462 * c-decl.c (pop_scope): Don't print warning in external_scope.
463
4435bb92
MP
4642014-10-19 Marek Polacek <polacek@redhat.com>
465
466 PR c/63567
467 * c-typeck.c (output_init_element): Allow initializing objects with
468 static storage duration with compound literals even in C99 and add
469 pedwarn for it.
470
7278465e
MP
4712014-10-17 Marek Polacek <polacek@redhat.com>
472
473 PR c/63567
474 * c-typeck.c (digest_init): Allow initializing objects with static
475 storage duration with compound literals even in C99 and add pedwarn
476 for it.
477
d9b7be2e
MP
4782014-10-17 Marek Polacek <polacek@redhat.com>
479
480 PR c/63543
481 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
482 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
483 error multiple times. Print the type.
484
f406ae1f
MP
4852014-10-17 Marek Polacek <polacek@redhat.com>
486
487 PR c/63549
488 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
489 type.
490
92574c7c
MP
4912014-10-17 Marek Polacek <polacek@redhat.com>
492
493 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
494 (start_function): Use OPT_Wimplicit_int instead of 0.
495 (store_parm_decls_oldstyle): Likewise.
496
1bc4a978
MT
4972014-10-17 Alan Modra <amodra@gmail.com>
498
499 PR middle-end/61848
500 * c-decl.c (merge_decls): Don't merge section name or tls model
501 to newdecl symtab node, instead merge to olddecl. Override
502 existing olddecl section name. Set tls_model for all thread-local
503 vars, not just OMP thread-private ones. Remove incorrect comment.
504
83685514
AM
5052014-10-16 Andrew MacLeod <amacleod@redhat.com>
506
507 * c-decl.c: Adjust include files.
508
78a7c317
DD
5092014-10-14 DJ Delorie <dj@redhat.com>
510
511 * c-parser.c (c_parse_init): Add RID entries for each __intN.
512 (c_token_starts_typename): Check all __intN, not just __int128.
513 (c_token_starts_declspecs): Likewise.
514 (c_parser_declspecs): Likewise.
515 (c_parser_attribute_any_word): Likewise.
516 (c_parser_objc_selector): Likewise.
517 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
518 (struct c_declspecs): Add int_n_idx field to record *which* __intN
519 is specified.
520 * c-decl.c (declspecs_add_type): Check for all __intN, not just
521 __int128.
522 (finish_declspecs): Likewise.
523
74d98c1e
AB
5242014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
525
526 * c-parser.c (c_parser_all_labels): New function to replace
527 the duplicate code.
528 (c_parser_statement): Call the new function.
529
84937de2
MP
5302014-10-09 Marek Polacek <polacek@redhat.com>
531
532 PR c/63480
533 * c-typeck.c (pop_init_level): Don't warn about initializing
534 with { }.
535
0382aaa0
MP
5362014-10-07 Marek Polacek <polacek@redhat.com>
537
538 PR c/59717
539 * c-decl.c (header_for_builtin_fn): New function.
540 (implicitly_declare): Suggest which header to include.
541
7a0ca710
MP
5422014-10-07 Marek Polacek <polacek@redhat.com>
543
544 * c-convert.c (convert): Use error_operand_p.
545 * c-typeck.c (require_complete_type): Likewise.
546 (really_atomic_lvalue): Likewise.
547 (digest_init): Likewise.
548 (handle_omp_array_sections_1): Likewise.
549
6bc8a126
MP
5502014-10-03 Marek Polacek <polacek@redhat.com>
551
552 PR c/63453
553 * c-decl.c (pop_scope): Don't warn about "inline function declared
554 but never defined" for functions marked with gnu_inline attribute.
555
d90c0a59
JJ
5562014-09-25 Jakub Jelinek <jakub@redhat.com>
557
558 PR c++/63249
559 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
560 on low_bound and length.
561
083e891e
MP
5622014-09-24 Marek Polacek <polacek@redhat.com>
563
564 PR c/61405
565 PR c/53874
566 * c-parser.c: Don't define CPP_KEYWORD.
567 (c_parser_switch_statement): Pass original type to c_finish_case.
568 * c-tree.h (c_finish_case): Update declaration.
569 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
570 conditionally to c_do_switch_warnings.
571
8d95fe25
MP
5722014-09-03 Marek Polacek <polacek@redhat.com>
573
574 PR c/62024
575 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
576 conversions.
577
9a771876
JJ
5782014-09-02 Jakub Jelinek <jakub@redhat.com>
579 Balaji V. Iyer <balaji.v.iyer@intel.com>
580 Igor Zamyatin <igor.zamyatin@intel.com>
581
582 * c-parser.c (c_parser_cilk_for): New function.
583 (c_parser_cilk_grainsize): Likewise.
584 (c_get_temp_regvar): Likewise.
585 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
586 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
587 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
588 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
589 case.
590
b7679d96
CG
5912014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
592
593 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
594 with using HOST_WIDE_INT without truncation to 'int'
595
59ea0364
MP
5962014-08-22 Marek Polacek <polacek@redhat.com>
597
598 PR c++/62199
599 * c-typeck.c (parser_build_binary_op): Adjust call to
600 warn_logical_not_parentheses.
601
671a475e
IZ
6022014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
603
604 PR other/62008
605 * c-parser.c (c_parser_array_notation): Check for correct
606 type of an array added.
607
04159acf
MP
6082014-08-19 Marek Polacek <polacek@redhat.com>
609
610 PR c++/62153
611 * c-typeck.c (build_binary_op): If either operand of a comparison
612 is a boolean expression, call maybe_warn_bool_compare.
613
c77935ee
PP
6142014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
615
616 PR c/45584
617 * c-typeck.c (build_c_cast): Do a conversion even when the
618 TYPE_MAIN_VARIANTs are the same.
619
35aff4fb
MP
6202014-08-19 Marek Polacek <polacek@redhat.com>
621
622 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
623 pedwarn_c99 instead of pedwarn.
624 (grokfield): Likewise.
625 (warn_defaults_to): New function.
626 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
627 Unconditionally call pedwarn_c99 instead of pedwarn.
628 (start_function): Call warn_defaults_to instead of pedwarn_c99.
629 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
630 check flag_isoc11 before.
631 * c-errors.c (pedwarn_c99): Change the return type to bool.
632 Handle -Wc99-c11-compat.
633 * c-parser.c (disable_extension_diagnostics): Handle
634 warn_c99_c11_compat.
635 (restore_extension_diagnostics): Likewise.
636 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
637 instead of pedwarn, don't check flag_isoc11 before.
638 (c_parser_declspecs): Likewise.
639 (c_parser_alignas_specifier): Likewise.
640 (c_parser_alignof_expression): Likewise.
641 (c_parser_generic_selection): Likewise.
642 * c-tree.h (pedwarn_c99): Update declaration.
643 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
644 of pedwarn_c99.
645
177cce46
MP
6462014-08-19 Marek Polacek <polacek@redhat.com>
647
648 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
649 to pedwarn_c90.
650 * c-errors.c: Include "opts.h".
651 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
652 * c-parser.c (disable_extension_diagnostics): Handle negative value
653 of warn_c90_c99_compat, too.
654 (restore_extension_diagnostics): Likewise.
655 (c_parser_compound_statement_nostart): Pass
656 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
657
6dc99c33
MP
6582014-08-12 Marek Polacek <polacek@redhat.com>
659
660 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
661 Add pedwarn.
662 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
663 Likewise.
664 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
665
f3bede71
MP
6662014-08-10 Marek Polacek <polacek@redhat.com>
667
668 PR c/51849
669 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
670 Call pedwarn_c90 instead of pedwarn.
671 (check_bitfield_type_and_width): Likewise.
672 (declspecs_add_qual): Likewise.
673 (declspecs_add_type): Likewise.
674 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
675 Adjust to only call pedwarn_c90.
676 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
677 pedwarn_c90 instead of pedwarn.
678 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
679 * c-parser.c (disable_extension_diagnostics): Handle
680 warn_c90_c99_compat.
681 (restore_extension_diagnostics): Likewise.
682 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
683 pedwarn_c90 instead of pedwarn.
684 (c_parser_initelt): Likewise.
685 (c_parser_postfix_expression): Likewise.
686 (c_parser_postfix_expression_after_paren_type): Likewise.
687 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
688 * c-tree.h: Fix formatting.
689 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
690 pedwarn_c90 instead of pedwarn.
691
9f25a338
TS
6922014-08-07 Trevor Saunders <tsaunders@mozilla.com>
693
694 * c-typeck.c: Remove include of pointer-set.h.
695
044331a8
MP
6962014-08-07 Marek Polacek <polacek@redhat.com>
697
698 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
699
b787e7a2
TS
7002014-08-02 Trevor Saunders <tsaunders@mozilla.com>
701
702 * c-typeck.c: Use hash_map instead of pointer_map.
703
6e2830c3
TS
7042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
705
706 * c-decl.c: Use hash_set instead of pointer_set.
707
a7ee52fb
IZ
7082014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
709
710 PR middle-end/61455
711 * c-array-notation.c (expand_array_notations): Handling
712 of DECL_EXPR added.
713
b4dfdc11
MG
7142014-07-31 Marc Glisse <marc.glisse@inria.fr>
715
716 PR c++/60517
717 * c-typeck.c (c_finish_return): Return 0 instead of the address of
718 a local variable.
719
976d5a22
TT
7202014-07-30 Tom Tromey <tromey@redhat.com>
721
722 * c-typeck.c (struct constructor_stack) <designator_depth>: New
723 field.
724 (really_start_incremental_init, push_init_level): Initialize
725 designator_depth.
726 (pop_init_level): Set global designator_depth.
727 (process_init_element): Check for designated_init attribute.
728
30281de2
MP
7292014-07-20 Marek Polacek <polacek@redhat.com>
730
731 PR c/61852
732 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
733 (implicitly_declare): Pass location to implicit_decl_warning.
734
b108f48f
JJ
7352014-07-14 Jakub Jelinek <jakub@redhat.com>
736
737 PR middle-end/61294
738 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
739 If non-NULL, call c_parser_check_literal_zero.
740 (c_parser_check_literal_zero): New function.
741 (c_parser_postfix_expression_after_primary): Adjust
742 c_parser_expr_list caller, handle -Wmemset-transposed-args.
743
773ec47f
MP
7442014-07-06 Marek Polacek <polacek@redhat.com>
745
746 PR c/6940
747 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
748 * c-tree.h (C_ARRAY_PARAMETER): Define.
749 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
750 function parameter.
751
22e1cf1c
JH
7522014-07-02 Jan Hubicka <hubicka@ucw.cz>
753 Chen Gang <gang.chen.5i5j@gmail.com>
754
755 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
756 releasing symbol.
757
52ec0ea3
MP
7582014-07-01 Marek Polacek <polacek@redhat.com>
759
760 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
761 instead of 0 to WARN_FOR_ASSIGNMENT.
762
d5c3d343
MP
7632014-07-01 Marek Polacek <polacek@redhat.com>
764
765 PR c/58286
766 * c-typeck.c (convert_for_assignment): Pass
767 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
768
6a7253a4
MP
7692014-06-30 Marek Polacek <polacek@redhat.com>
770
771 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
772 has no_sanitize_undefined attribute.
773
5e88a8f4
IZ
7742014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
775
776 PR middle-end/57541
777 * c-array-notation.c (fix_builtin_array_notation_fn):
778 Check for 0 arguments in builtin call. Check that bultin argument is
779 correct.
780 * c-parser.c (c_parser_array_notation): Check for incorrect initial
781 index.
782
9698b078
SH
7832014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
784
785 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
786 qualifiers in __auto_type for atomic types.
787 (c_parser_typeof_specifier): Discard all type qualifiers in
788 __typeof__ for atomic types.
789
6e07c515
MP
7902014-06-25 Marek Polacek <polacek@redhat.com>
791
792 PR c/61162
793 * c-parser.c (c_parser_statement_after_labels): Pass the location of
794 the return expression to c_finish_return.
795
da6f124d
JJ
7962014-06-25 Jakub Jelinek <jakub@redhat.com>
797
798 * c-typeck.c (c_finish_omp_clauses): Make sure
799 OMP_CLAUSE_LINEAR_STEP has correct type.
800
c203e8a7
TS
8012014-06-24 Trevor Saunders <tsaunders@mozilla.com>
802
803 * c-decl.c: Adjust.
804
56ad0e38
JJ
8052014-06-24 Jakub Jelinek <jakub@redhat.com>
806
807 * c-parser.c (c_parser_omp_for_loop): For
808 #pragma omp parallel for simd move lastprivate clause from parallel
809 to for rather than simd.
810
47c2554f
MP
8112014-06-23 Marek Polacek <polacek@redhat.com>
812
813 * c-typeck.c (parser_build_binary_op): Don't call
814 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
815
56363ffd
JH
8162014-06-15 Jan Hubicka <hubicka@ucw.cz>
817
818 * c-parser.c (c_parser_omp_threadprivate): Likewise.
819 * c-decl.c (merge_decls): Likewise.
820
d7ff7ae5
MP
8212014-06-09 Marek Polacek <polacek@redhat.com>
822
823 PR c/36446
824 * c-typeck.c (error_init): Call inform instead of error_at.
825 (pedwarn_init): Call inform instead of pedwarn.
826 (warning_init): Call inform instead of warning_at.
827
24d047a3
JH
8282014-06-07 Jan Hubicka <hubicka@ucw.cz>
829
830 * c-decl.c (merge_decls): Use set_decl_section_name.
831 (duplicate_decls): Remove node if it exists.
832
9bac5cbb
G
8332014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
834
835 PR c/53119
836 * c-typeck.c (push_init_level, process_init_element,
837 pop_init_level): Correct check for zero initialization, move
838 missing brace warning to respect zero initialization.
839
8ffcdea8
MP
8402014-06-05 Marek Polacek <polacek@redhat.com>
841
842 PR c/56724
843 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
844
742938c9
MP
8452014-06-05 Marek Polacek <polacek@redhat.com>
846
847 PR c/49706
848 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
849 on the left hand side operand of a comparison.
850
6447c55d
MP
8512014-06-05 Marek Polacek <polacek@redhat.com>
852
853 PR c/48062
854 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
855 Print note only if the warning was printed.
856
9dc7743c
IZ
8572014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
858
859 PR c/58942
860 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
861 with a pointer.
862
fedfecef
MP
8632014-06-03 Marek Polacek <polacek@redhat.com>
864
865 PR c/60439
866 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
867 c_start_case.
868 * c-tree.h (c_start_case): Update.
869 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
870 switch condition has boolean value.
871
9b2b7279
AM
8722014-06-02 Andrew MacLeod <amacleod@redhat.com>
873
874 * c-decl.c: Include builtins.h.
875 * c-parser.c: Likewise.
876
5c1bc275
MP
8772014-05-27 Marek Polacek <polacek@redhat.com>
878
879 PR c/56724
880 * c-typeck.c (convert_arguments): Get location of a parameter. Change
881 error and warning calls to error_at and warning_at. Pass location of
882 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
883 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
884 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
885
97563bc8
IZ
8862014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
887
888 PR c/61191
889 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
890 function parameters.
891
aede2c10
JH
8922014-05-23 Jan Hubicka <hubicka@ucw.cz>
893
894 * c-decl.c (merge_decls): Preserve symtab node pointers.
895 (duplicate_decls): Free new decl.
896
edbba2ce
TS
8972014-05-23 Thomas Schwinge <thomas@codesourcery.com>
898
f3316c6d
TS
899 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
900 initialization.
901
edbba2ce
TS
902 * c-parser.c (c_parser_omp_target): Return bool values.
903
68c81f24
TS
9042014-05-22 Thomas Schwinge <thomas@codesourcery.com>
905
906 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
907 num_teams_loc variable to num_thread_limit_loc.
908
632f2871
RS
9092014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
910
911 * c-array-notation.c (expand_array_notations): Use void_node
912 instead of void_zero_node.
913
766090c2
TS
9142014-05-17 Trevor Saunders <tsaunders@mozilla.com>
915
916 * c-decl.c (finish_struct): Adjust.
917 (finish_enum): Likewise.
918 (bind): Adjust.
919 (record_inline_static): Likewise.
920 (push_scope): Likewise.
921 (make_label): Likewise.
922 (lookup_label_for_goto): Likewise.
923 (finish_struct): Likewise.
924 (finish_enum): Likewise.
925 (store_parm_decls): Likewise.
926 (c_push_function_context): Likewise.
927 * c-lang.h: Remove usage of variable_size gty attribute.
928 * c-parser.c (c_parse_init): Adjust.
929 (c_parse_file): Likewise.
930
2b107f6b
MP
9312014-05-13 Marek Polacek <polacek@redhat.com>
932
933 PR c/61162
934 * c-typeck.c (convert_for_assignment): Pass location to
935 WARN_FOR_ASSIGNMENT instead of input_location.
936
d033409e
MP
9372014-05-10 Marek Polacek <polacek@redhat.com>
938
939 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
940 maybe_warn_string_init.
941 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
942 maybe_warn_string_init.
943 * c-tree.h (maybe_warn_string_init): Update declaration.
944 * c-typeck.c (maybe_warn_string_init): Add location parameter.
945 Call pedwarn_init with loc instead of with input_location.
946 (digest_init): Pass init_loc to maybe_warn_string_init.
947 (pop_init_level): Call pedwarn_init with loc instead of with
948 input_location.
949 (set_init_index): Likewise.
950 (process_init_element): Likewise.
951
ea58ef42
MP
9522014-05-09 Marek Polacek <polacek@redhat.com>
953
954 PR c/61096
955 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
956 (c_parser_initelt): Pass location to set_init_label. Pass array index
957 location to set_init_index.
958 * c-tree.h (push_init_level): Update declaration.
959 (pop_init_level): Likewise.
960 (set_init_index): Likewise.
961 (set_init_label): Likewise.
962 * c-typeck.c (error_init): Add location parameter. Call error_at
963 instead of error.
964 (digest_init): Pass init_loc to error_init.
965 (really_start_incremental_init):
966 (push_init_level): Add location parameter. Pass loc to pop_init_level
967 and error_init.
968 (pop_init_level): Likewise.
969 (set_designator): Add location parameter. Pass loc to pop_init_level,
970 push_init_level, and error_init.
971 (set_init_index): Add location parameter. Pass loc to error_init and
972 set_designator.
973 (set_init_label): Likewise.
974 (output_init_element): Pass loc to error_init.
975 (process_init_element): Pass loc to error_init, pop_init_level,
976 pedwarn_init, and push_init_level.
977
661a0813
MP
9782014-05-09 Marek Polacek <polacek@redhat.com>
979
980 PR c/50459
981 * c-parser.c (c_parser_attributes): Parse the arguments as an
982 expression-list if the attribute takes identifier.
983
2793eeab
MP
9842014-05-08 Marek Polacek <polacek@redhat.com>
985
986 PR c/61053
987 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
988 TYPE_ALIGN_UNIT.
989
f827930a
MP
9902014-05-08 Marek Polacek <polacek@redhat.com>
991
992 PR c/61077
993 * c-decl.c (start_function): Warn for _Atomic-qualified return type
994 of main.
995
1d60af08
KZ
9962014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
997 Mike Stump <mikestump@comcast.net>
998 Richard Sandiford <rdsandiford@googlemail.com>
999
1000 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1001 (finish_enum): Use wide-int interfaces.
1002 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1003 * c-typeck.c (build_c_cast): Likewise.
1004 (set_nonincremental_init_from_string): Likewise.
1005 (c_tree_equal): Likewise.
1006
a0e24419
MP
10072014-05-02 Marek Polacek <polacek@redhat.com>
1008
1009 PR c/25801
1010 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1011 Return size_one_node when the type is not complete.
1012 (pointer_diff): Remove comment.
1013 (build_unary_op): Improve error messages.
1014
19fc9faa
MP
10152014-05-02 Marek Polacek <polacek@redhat.com>
1016
1017 * c-typeck.c (c_finish_return): Separate warning_at calls.
1018
63bc4e87
MP
10192014-05-02 Marek Polacek <polacek@redhat.com>
1020
1021 * c-tree.h (error_init): Remove declaration.
1022 (pedwarn_init): Likewise.
1023 * c-typeck.c (error_init): Make static and move above.
1024 (pedwarn_init): Likewise.
1025 (warning_init): Move above.
1026 (maybe_warn_string_init): Likewise.
1027
4bd2511b
JL
10282014-05-01 Jeff Law <law@redhat.com>
1029
1030 Revert:
1031
1032 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1033 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1034 avoid goto.
1035
6a358dcb
MP
10362014-05-02 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/60784
1039 * c-typeck.c (push_init_level): Set constructor_designated to
1040 p->designated for structures.
1041
ae5ebda4
MP
10422014-05-01 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/60915
1045 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1046 function-definition has an attribute after the declarator.
1047
96b40f8d
MP
10482014-05-01 Marek Polacek <polacek@redhat.com>
1049
1050 PR c/60257
1051 * c-typeck.c (warning_init): Add location_t parameter. Call
1052 warning_at instead of warning.
1053 (push_init_level): Pass input_location to warning_init.
1054 (add_pending_init): Add location_t parameter. Pass loc to
1055 warning_init.
1056 (set_nonincremental_init): Pass input_location to add_pending_init.
1057 (set_nonincremental_init_from_string): Likewise.
1058 (output_init_element): Pass loc to warning_init and to
1059 add_pending_init.
1060
32e00768
MP
10612014-05-01 Marek Polacek <polacek@redhat.com>
1062
1063 PR c/43395
1064 * c-typeck.c (c_finish_return): Distinguish between label and variable
1065 when warning about returning local address.
1066
c9379ce2
MP
10672014-05-01 Marek Polacek <polacek@redhat.com>
1068
1069 PR c/29467
1070 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1071 in C89 mode.
1072
d00887e8
MP
10732014-05-01 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/43245
1076 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1077 instead of 0 to WARN_FOR_QUALIFIERS.
1078
5436fa2e
MP
10792014-05-01 Marek Polacek <polacek@redhat.com>
1080
1081 PR c/56989
1082 * c-typeck.c (default_conversion): Use better location for
1083 error call.
1084
f8ed5150
MP
10852014-04-30 Marek Polacek <polacek@redhat.com>
1086
1087 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1088 also when SANITIZE_FLOAT_DIVIDE is on.
1089
8337d1db
MP
10902014-04-30 Marek Polacek <polacek@redhat.com>
1091
1092 PR c/60139
1093 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1094 and pedwarn_init. Use loc insted of input_location.
1095
c4bdc42f
MP
10962014-04-30 Marek Polacek <polacek@redhat.com>
1097
1098 PR c/60351
1099 * c-typeck.c (build_binary_op): Use location when warning about
1100 shift count.
1101
45484dcf
MP
11022014-04-25 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/18079
1105 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1106 always_inline/noinline and hot/cold attributes.
1107
34cf811f
MP
11082014-04-25 Marek Polacek <polacek@redhat.com>
1109
1110 PR c/60114
1111 * c-parser.c (c_parser_initelt): Pass input_location to
1112 process_init_element.
1113 (c_parser_initval): Pass loc to process_init_element.
1114 * c-tree.h (process_init_element): Adjust declaration.
1115 * c-typeck.c (push_init_level): Pass input_location to
1116 process_init_element.
1117 (pop_init_level): Likewise.
1118 (set_designator): Likewise.
1119 (output_init_element): Add location_t parameter. Pass loc to
1120 digest_init.
1121 (output_pending_init_elements): Pass input_location to
1122 output_init_element.
1123 (process_init_element): Add location_t parameter. Pass loc to
1124 output_init_element.
1125
42056eac
JJ
11262014-04-24 Jakub Jelinek <jakub@redhat.com>
1127
1128 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1129 atomic-clause, allow comma in between atomic-clause and
1130 seq_cst.
1131
e162a134
JJ
11322014-04-22 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c/59073
1135 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1136 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1137
2f6babac
IZ
11382014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1139
1140 PR middle-end/60469
1141 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1142 create_tmp_var instead build_decl for creating temps.
1143 (build_array_notation_expr): Likewise.
1144 (fix_conditional_array_notations_1): Likewise.
1145 (fix_array_notation_expr): Likewise.
1146 (fix_array_notation_call_expr): Likewise.
1147
8edbfaa6
JJ
11482014-03-28 Jakub Jelinek <jakub@redhat.com>
1149
1150 PR c++/60689
1151 * c-tree.h (c_build_function_call_vec): New prototype.
1152 * c-typeck.c (build_function_call_vec): Don't call
1153 resolve_overloaded_builtin here.
1154 (c_build_function_call_vec): New wrapper function around
1155 build_function_call_vec. Call resolve_overloaded_builtin here.
1156 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1157 Call c_build_function_call_vec instead of build_function_call_vec.
1158 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1159 * c-decl.c (finish_decl): Likewise.
1160
7485aeea
MLI
11612014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1162
1163 PR c/55383
1164 * c-typeck.c: Use correct format string in cast-qual warning
1165
b17a8b07
TS
11662014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1167
1168 * c-decl.c (c_decl_attributes): Use
1169 lang_hooks.types.omp_mappable_type.
1170 * c-typeck.c (c_finish_omp_clauses): Likewise.
1171
3af9c5e9
MP
11722014-03-06 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/60197
1175 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1176 of checking tree code.
1177
1c9f5f33
PK
11782014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1179
1180 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1181 (c_parser_parameter_declaration): Likewise.
1182
cc28fc7f
MP
11832014-02-19 Marek Polacek <polacek@redhat.com>
1184
1185 PR c/60195
1186 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1187 Call mark_exp_read on exp.value.
1188 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1189 TREE_ADDRESSABLE on old instead of val.
1190 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1191
b581c05c
PK
11922014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1193
1194 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1195 C_EXPR_APPEND by vec_safe_push.
1196 * c-tree.h (C_EXPR_APPEND): Remove.
1197
81e5eca8
MP
11982014-01-31 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/59963
1201 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1202 build_function_call_vec.
1203 (build_function_call): Likewise.
1204 (build_atomic_assign): Likewise.
1205 (build_function_call_vec): Add arg_loc parameter. Use it.
1206 (convert_arguments): Likewise.
1207 (convert_for_assignment): Rename rhs_loc to expr_loc.
1208 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1209 (c_parser_objc_keywordexpr): Likewise.
1210 (c_parser_postfix_expression_after_primary): Call
1211 build_function_call_vec with expr_loc rather than op_loc.
1212 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1213 build_function_call_vec.
1214 (c_parser_expr_list): Add locations parameter. Fill it with locations
1215 of function arguments.
1216 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1217
68fca595
MP
12182014-01-30 Marek Polacek <polacek@redhat.com>
1219
1220 PR c/59940
1221 * c-typeck.c (build_function_call_vec): Use loc parameter.
1222 (convert_arguments): Add location parameter. Use it.
1223 (ep_convert_and_check): Likewise.
1224 (build_atomic_assign): Adjust convert_for_assignment call.
1225 (build_modify_expr): Likewise.
1226 (digest_init): Likewise.
1227 (c_finish_return): Likewise.
1228 (build_conditional_expr): Adjust ep_convert_and_check calls.
1229 (convert_for_assignment): Add rhs_loc parameter. Use it.
1230 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1231 calls.
1232
fa337f3a
RB
12332014-01-30 Richard Biener <rguenther@suse.de>
1234
1235 PR c/59905
1236 * c-typeck.c (build_function_call_vec): Do not replace calls
1237 to a function via an incompatible type with a runtime abort.
1238
b72271b9
BI
12392014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1240
1241 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1242 flag_enable_cilkplus with flag_cilkplus.
1243 (c_parser_direct_declarator_inner): Likewise.
1244 (c_parser_attribute_any_word): Likewise.
1245 (c_parser_attributes): Likewise.
1246 (c_parser_compound_statement): Likewise.
1247 (c_parser_statement_after_labels): Likewise.
1248 (c_parser_if_statement): Likewise.
1249 (c_parser_switch_statement): Likewise.
1250 (c_parser_do_statement): Likewise.
1251 (c_parser_for_statement): Likewise.
1252 (c_parser_unary_expression): Likewise.
1253 (c_parser_postfix_expression): Likewise.
1254 (c_parser_postfix_expression_after_primary): Likewise.
1255 (c_parser_postfix_expression_after_primary): Likewise.
1256 (c_parser_omp_clause_name): Likewise.
1257 (c_finish_omp_declare_simd): Likewise.
1258 (c_parser_cilk_verify_simd): Likewise.
1259 * c-typeck.c (build_array_ref): Likewise.
1260 (build_function_call_vec): Likewise.
1261 (convert_arguments): Likewise.
1262 (build_compound_expr): Likewise.
1263 (c_finish_return): Likewise.
1264 (c_finish_if_stmt): Likewise.
1265 (c_finish_loop): Likewise.
1266 (build_binary_op): Likewise.
1267
393e8e8b
MP
12682014-01-23 Marek Polacek <polacek@redhat.com>
1269
1270 PR c/59846
1271 * c-typeck.c (parser_build_binary_op): Use location instead of
1272 input_location.
1273 (build_binary_op): Pass location to shorten_compare.
1274
f04dda30
MP
12752014-01-23 Marek Polacek <polacek@redhat.com>
1276
1277 PR c/58346
1278 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1279 an empty aggregate.
1280
789eadcd
MP
12812014-01-23 Marek Polacek <polacek@redhat.com>
1282
1283 PR c/59871
1284 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1285 of a comma expression.
1286 (emit_side_effect_warnings): Likewise.
1287
40f14e9f
BI
12882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1289
1290 PR c/59825
1291 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1292 function to use walk_tree and moved a lot of its functionality to
1293 expand_array_notations.
1294 (expand_array_notations): New function.
1295
74558dd9
BI
12962014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1297
1298 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1299 attribute an attribute without value.
1300
652fea39
JJ
13012014-01-23 Jakub Jelinek <jakub@redhat.com>
1302
1303 PR middle-end/58809
1304 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1305 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1306
f34f1c87
MP
13072014-01-22 Marek Polacek <polacek@redhat.com>
1308
1309 PR c/59891
1310 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1311 of remove_c_maybe_const_expr on op1 and op2.
1312
241f845a
JJ
13132014-01-15 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR c/58943
1316 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1317 effects, preevaluate rhs using SAVE_EXPR first.
1318
9a74f20c
BI
13192014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1320
1321 PR c++/59631
1322 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1323 statements with if-elseif statements.
1324
96066ce1
MP
13252014-01-06 Marek Polacek <polacek@redhat.com>
1326
1327 PR c/57773
1328 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1329 defined bit-field types only in ISO C.
1330
23a5b65a
RS
13312014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1332
1333 Update copyright years
1334
f9030485
RS
13352014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1336
1337 * c-array-notation.c: Use the standard form for the copyright notice.
1338
41958c28
BI
13392013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1340
1341 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1342 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1343 field in parser is not empty. If not-empty, call the function
1344 c_parser_finish_omp_declare_simd.
1345 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1346 between SIMD-enabled functions and #pragma simd. Added new parameter.
1347 (c_parser_cilk_all_clauses): Modified the usage of the function
1348 c_parser_cilk_clause_vectorlength as mentioned above.
1349 (c_parser_cilk_simd_fn_vector_attrs): New function.
1350 (c_finish_cilk_simd_fn_tokens): Likewise.
1351 (is_cilkplus_vector_p): Likewise.
1352 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1353 "nomask," and "mask" strings in clause name.
1354 (c_parser_omp_all_clauses): Added 3 new case statements:
1355 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1356 PRAGMA_CILK_CLAUSE_NOMASK.
1357 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1358 check for vector attribute and if so call the function
1359 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1360 called the function c_finish_cilk_simd_fn_tokens.
1361 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1362 parser field is non-empty. If so, parse them as you would parse
1363 the omp declare simd pragma.
1364 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1365 Added a check when step is a parameter and flag it as error.
1366 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1367 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1368 pragma_omp_clause.
1369
cef0fd0e
TS
13702013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1371
1372 * c-parser.c (c_parser_omp_parallel): Fix description.
1373
12893402
BI
13742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1375
1376 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1377 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1378 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1379 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1380
296674db
JM
13812013-12-04 Joseph Myers <joseph@codesourcery.com>
1382
1383 PR c/52023
1384 * c-parser.c (c_parser_alignas_specifier): Use
1385 c_sizeof_or_alignof_type instead of c_alignof.
1386 (c_parser_alignof_expression): Likewise, with min_alignof
1387 parameter depending on alignof spelling used.
1388
edd28054
MP
13892013-12-04 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/54113
1392 * c-decl.c (start_function): Don't warn for missing prototype for
1393 inline functions.
1394
da0fc454
MP
13952013-12-03 Marek Polacek <polacek@redhat.com>
1396
1397 PR c/59351
1398 * c-decl.c (build_compound_literal): Allow compound literals with
1399 empty initial value.
1400
4c2ecab0
JM
14012013-12-02 Joseph Myers <joseph@codesourcery.com>
1402
1403 PR c/58235
1404 * c-typeck.c (build_modify_expr): Diagnose assignment to
1405 expression with array type.
1406
340baef7
JM
14072013-11-29 Joseph Myers <joseph@codesourcery.com>
1408
1409 PR c/42262
1410 * c-typeck.c (process_init_element): Do not treat a string as
1411 initializing a whole array when used with a designator for an
1412 individual element.
1413
6763b9f7
JM
14142013-11-29 Joseph Myers <joseph@codesourcery.com>
1415
1416 PR c/57574
1417 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1418 an inline function following a static declaration.
1419
e7bd1de1
JJ
14202013-11-28 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR c/59310
1423 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1424 to p_name before calling c_parser_omp_teams instead of after.
1425 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1426 argument. Remove unused p_name variable.
1427
0136f8f0
AH
14282013-11-27 Aldy Hernandez <aldyh@redhat.com>
1429 Jakub Jelinek <jakub@redhat.com>
1430
1431 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1432 external_scope is NULL.
1433
241b71bb
TV
14342013-11-27 Tom de Vries <tom@codesourcery.com>
1435 Marc Glisse <marc.glisse@inria.fr>
1436
1437 PR c++/59032
1438 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1439
2fb9a547
AM
14402013-11-22 Andrew MacLeod <amacleod@redhat.com>
1441
1442 * c-typeck.c: Add required include files from gimple.h.
1443
8400e75e
DM
14442013-11-22 David Malcolm <dmalcolm@redhat.com>
1445
1446 * c-decl.c (define_label, shadow_tag_warned)
1447 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1448 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1449 (declspecs_add_type): Remove use of in_system_header macro.
1450 * c-parser.c (c_parser_unary_expression): Likewise.
1451 * c-typeck.c (store_init_value, process_init_element)
1452 (c_start_case): Likewise.
1453
1454 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1455 macro.
1456
1457 * c-parser.c (c_parser_set_source_position_from_token): Remove
1458 reference to in_system_header from comment.
1459
386b1f1f
RS
14602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1461
1462 * c-decl.c (grokdeclarator): Update comment to refer to
1463 tree_to_[su]hwi rather than tree_low_cst.
1464
ae7e9ddd
RS
14652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1466
1467 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1468 tree_to_uhwi throughout.
1469
9439e9a1
RS
14702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1471
1472 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1473 throughout.
1474
9541ffee
RS
14752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1476
1477 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1478 throughout.
1479
c02065fc
AH
14802013-11-15 Aldy Hernandez <aldyh@redhat.com>
1481
1482 * c-parser.c (c_parser_cilk_simd): New.
1483 (c_parser_cilk_verify_simd): New.
1484 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1485 (c_parser_omp_for_loop): Add case for NE_EXPR.
1486 Set c_break_label for CILK_SIMD.
1487 (c_parser_cilk_clause_vectorlength): New.
1488 (c_parser_cilk_clause_linear): New.
1489 (c_parser_cilk_clause_name): New.
1490 (c_parser_cilk_all_clauses): New.
1491 * c-typeck.c (build_unary_op): Pass location argument to
1492 readonly_error.
1493 (build_modify_expr): Same.
1494 (build_asm_expr): Same.
1495 (c_finish_bc_stmt): Error on break/continue in loops.
1496
18f429e2
AM
14972013-11-14 Andrew MacLeod <amacleod@redhat.com>
1498
1499 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1500
d8a2d370
DN
15012013-11-14 Diego Novillo <dnovillo@google.com>
1502
1503 * c-decl.c: Include print-tree.h.
1504 Include stor-layout.h.
1505 Include varasm.h.
1506 Include attribs.h.
1507 Include stringpool.h.
1508 * c-lang.c: Include fold-const.h.
1509 * c-parser.c: Include stringpool.h.
1510 Include attribs.h.
1511 Include stor-layout.h.
1512 Include varasm.h.
1513 Include trans-mem.h.
1514 * c-typeck.c: Include stor-layout.h.
1515 Include trans-mem.h.
1516 Include varasm.h.
1517 Include stmt.h.
1518
38b7bc7f
JM
15192013-11-13 Joseph Myers <joseph@codesourcery.com>
1520
1521 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1522 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1523 __auto_type.
1524 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1525 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1526 RID_AUTO_TYPE.
1527 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1528 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1529 (c_parser_declarator, c_parser_direct_declarator_inner)
1530 (c_parser_parameter_declaration, c_parser_type_name): All callers
1531 changed.
1532 (c_parser_declaration_or_fndef): Handle declarations with type
1533 determined from the initializer.
1534
45b0be94
AM
15352013-11-12 Andrew MacLeod <amacleod@redhat.com>
1536
18f429e2 1537 * c-typeck.c: Include gimplify.h.
45b0be94 1538
582d9b50
JM
15392013-11-12 Joseph Myers <joseph@codesourcery.com>
1540
1541 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1542 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1543 comment.
1544 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1545 or _Thread_local as appropriate in diagnostics.
1546 (build_null_declspecs): Initialize ret->thread_gnu_p.
1547 (declspecs_add_scspec): Handle either __thread or _Thread_local
1548 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1549 pedantic. Do not disallow _Thread_local extern and _Thread_local
1550 static.
1551
267bac10
JM
15522013-11-07 Joseph Myers <joseph@codesourcery.com>
1553 Andrew MacLeod <amacleod@redhat.com>
1554
1555 * c-aux-info.c (gen_type): Handle atomic qualifier.
1556 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1557 qualifiers when compating types.
1558 (shadow_tag_warned): Handle atomic_p in declspecs.
1559 (quals_from_declspecs): Likewise.
1560 (start_decl): Use c_type_promotes_to when promoting argument
1561 types.
1562 (grokdeclarator): Handle _Atomic.
1563 (get_parm_info): Diagnose any qualifier on "void" as only
1564 parameter.
1565 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1566 comparing types. Use c_type_promotes_to when promoting argument
1567 types.
1568 (finish_function): Use c_type_promotes_to when promoting argument
1569 types.
1570 (build_null_declspecs): Handle atomic_p in declspecs.
1571 (declspecs_add_qual): Handle RID_ATOMIC.
1572 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1573 (c_token_starts_declspecs): Handle RID_ATOMIC.
1574 (c_parser_declspecs): Handle atomic type specifiers and
1575 qualifiers.
1576 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1577 from types of expressions with atomic type.
1578 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1579 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1580 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1581 (c_parser_statement_after_labels, c_parser_switch_statement)
1582 (c_parser_for_statement, c_parser_expr_no_commas)
1583 (c_parser_conditional_expression, c_parser_binary_expression)
1584 (c_parser_cast_expression, c_parser_unary_expression)
1585 (c_parser_postfix_expression)
1586 (c_parser_postfix_expression_after_primary, c_parser_expression):
1587 Use convert_lvalue_to_rvalue.
1588 (c_parser_expression_conv, c_parser_expr_list): Document
1589 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1590 (c_parser_objc_synchronized_statement): Use
1591 convert_lvalue_to_rvalue.
1592 (c_parser_objc_selector): Handle RID_ATOMIC.
1593 (c_parser_objc_receiver, c_parser_array_notation): Use
1594 convert_lvalue_to_rvalue.
1595 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1596 _Atomic (type-name).
1597 (struct c_declspecs): Add atomic_p field.
1598 (convert_lvalue_to_rvalue): Declare.
1599 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1600 corresponding atomic types.
1601 (qualify_type): Don't add _Atomic qualifiers from second argument.
1602 (comp_target_types): Do not allow _Atomic mismatches.
1603 (type_lists_compatible_p): Do not remove atomic qualifiers when
1604 comparing types.
1605 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1606 (build_atomic_assign): New functions.
1607 (build_unary_op): Use build_atomic_assign for atomic increment and
1608 decrement.
1609 (build_conditional_expr): Do not treat _Atomic void as a qualified
1610 version of void.
1611 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1612 (find_anonymous_field_with_type, convert_to_anonymous_field)
1613 (convert_for_assignment): Do not remove atomic qualifiers when
1614 comparing types.
1615 (digest_init): Do not accept initialization of arrays of atomic
1616 elements by string constants.
1617 (build_asm_expr): Use convert_lvalue_to_rvalue.
1618 (build_binary_op): Do not treat _Atomic void as a qualified
1619 version of void.
1620
0c249d4b
DD
16212013-11-06 DJ Delorie <dj@redhat.com>
1622
1623 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1624 both explicit and builtin, print the location of the explicit one.
1625
6d7f7e0a
TB
16262013-11-05 Tobias Burnus <burnus@net-b.de>
1627
1628 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1629 c_parser_omp_distribute, c_parser_omp_teams,
1630 c_parser_omp_target, c_parser_omp_declare): Handle
1631 -fopenmp-simd.
1632
b906f4ca
MP
16332013-11-03 Marek Polacek <polacek@redhat.com>
1634
1635 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1636
ee1d5a02
JJ
16372013-11-01 Jakub Jelinek <jakub@redhat.com>
1638
1639 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1640 check_dup_generic at the end, unless remove is true.
1641 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1642 remove = true;.
1643 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1644
5a9785fb
JJ
16452013-10-31 Jakub Jelinek <jakub@redhat.com>
1646
1647 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1648 with decl that is not pointer nor array.
1649
939b37da
BI
16502013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1651
1652 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1653 a spawning function is found.
1654 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1655 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1656 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1657 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1658 case.
1659 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1660 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1661 expr.
1662 (c_finish_return): Added a check to reject _Cilk_spawn in return
1663 expression.
1664 (build_cilk_spawn): New function.
1665 (build_cilk_sync): Likewise.
1666 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1667
d4af74d4
TB
16682013-10-27 Tobias Burnus <burnus@net-b.de>
1669
1670 PR other/33426
1671 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1672 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1673 (c_parser_statement_after_labels): Update calls.
1674
d73749df 16752013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1676
1677 PR other/33426
1678 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1679 Handle PRAGMA_IVDEP.
1680 (c_parser_statement_after_labels): Update call.
1681
f28aa681
MP
16822013-10-24 Marek Polacek <polacek@redhat.com>
1683
1684 * c-parser.c (c_parser_struct_declaration): Add a comment.
1685 (c_parser_declarator): Don't allow _Alignas here.
1686
0645c1a2
AM
16872013-10-17 Andrew MacLeod <amacleod@redhat.com>
1688
1689 * c-parser.c: Include omp-low.h.
1690 * c-typeck.c: Likewise.
1691
568a31f2
MP
16922013-10-17 Marek Polacek <polacek@redhat.com>
1693
1694 PR c/58267
1695 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1696 Document syntax of the array-declarator.
1697 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1698 are not permitted.
1699 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1700 (c_parser_struct_declaration): Likewise.
1701 (c_parser_declarator): Likewise.
1702 (c_parser_direct_declarator_inner): Likewise.
1703 (c_parser_parameter_declaration): Likewise.
1704 (c_parser_type_name): Likewise.
1705
acf0174b
JJ
17062013-10-11 Jakub Jelinek <jakub@redhat.com>
1707
1708 * c-lang.h (current_omp_declare_target_attribute): New extern
1709 decl.
1710 * c-parser.c: Include c-lang.h.
1711 (struct c_parser): Change tokens to c_token *.
1712 Add tokens_buf field. Change tokens_avail type to unsigned int.
1713 (c_parser_consume_token): If parser->tokens isn't
1714 &parser->tokens_buf[0], increment parser->tokens.
1715 (c_parser_consume_pragma): Likewise.
1716 (enum pragma_context): Add pragma_struct and pragma_param.
1717 (c_parser_external_declaration): Adjust
1718 c_parser_declaration_or_fndef caller.
1719 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1720 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1721 Adjust recursive call.
1722 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1723 of pragma_external.
1724 (c_parser_parameter_declaration): Use pragma_param instead of
1725 pragma_external.
1726 (c_parser_compound_statement_nostart, c_parser_label,
1727 c_parser_for_statement): Adjust
1728 c_parser_declaration_or_fndef callers.
1729 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1730 it through to c_parser_conditional_expression.
1731 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1732 pass it through to c_parser_binary_expression. Adjust recursive
1733 call.
1734 (c_parser_binary_expression): Remove prec argument, add
1735 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1736 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1737 binop matches it, use build2 instead of parser_build_binary_op.
1738 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1739 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1740 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1741 Handle pragma_struct and pragma_param the same as pragma_external.
1742 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1743 (c_parser_omp_variable_list): Parse array sections for
1744 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1745 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1746 (c_parser_omp_clause_reduction): Handle user defined reductions.
1747 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1748 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1749 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1750 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1751 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1752 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1753 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1754 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1755 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1756 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1757 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1758 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1759 (c_parser_omp_for_loop): Add CODE argument, pass it through
1760 to c_finish_omp_for. Change last argument to cclauses,
1761 and adjust uses to grab parallel clauses from the array of all
1762 the split clauses. Adjust c_parser_binary_expression,
1763 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1764 (omp_split_clauses): New function.
1765 (c_parser_omp_simd): New function.
1766 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1767 Allow the function to be called also when parsing combined constructs,
1768 and call c_parser_omp_simd when parsing for simd.
1769 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1770 #pragma omp section, require exactly one structured-block instead of
1771 sequence of statements.
1772 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1773 Allow the function to be called also when parsing combined constructs.
1774 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1775 Allow the function to be called also when parsing combined
1776 constructs.
1777 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1778 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1779 c_parser_omp_teams, c_parser_omp_target_data,
1780 c_parser_omp_target_update, c_parser_omp_target,
1781 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1782 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1783 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1784 (c_parser_omp_construct): Add p_name and mask vars. Handle
1785 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1786 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1787 and c_parser_omp_sections callers.
1788 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1789 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1790 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1791 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1792 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1793 OMP_CLAUSE_DEPEND.
1794 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1795 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1796 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1797 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1798 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1799 * c-typeck.c: Include tree-inline.h.
1800 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1801 handle_omp_array_sections_1, handle_omp_array_sections,
1802 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1803 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1804 user defined reductions.
1805 (c_tree_equal): New function.
1806 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1807 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1808 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1809 c_check_omp_declare_reduction_r): New prototypes.
1810 * c-decl.c (current_omp_declare_target_attribute): New variable.
1811 (c_decl_attributes): New function.
1812 (start_decl, start_function): Use it instead of decl_attributes.
1813 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1814 c_omp_reduction_decl, c_omp_reduction_lookup,
1815 c_check_omp_declare_reduction_r): New functions.
1816
0a6c2227
TT
18172013-09-25 Tom Tromey <tromey@redhat.com>
1818
1819 * Make-lang.in (c/gccspec.o): Remove.
1820 (CFLAGS-c/gccspec.o): New variable.
1821 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1822 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1823 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1824
f3bc55f0
TT
18252013-09-25 Tom Tromey <tromey@redhat.com>
1826
1827 * Make-lang.in (c/gccspec.o): Don't use subshell.
1828
a24d975c
MP
18292013-09-18 Marek Polacek <polacek@redhat.com>
1830
1831 PR sanitize/58443
1832 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1833 Remove unnecessary check.
1834
ce6923c5
MP
18352013-09-18 Marek Polacek <polacek@redhat.com>
1836
1837 PR sanitizer/58411
1838 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1839 no_sanitize_undefined attribute.
1840
a1e51df9
KT
18412013-09-13 Kai Tietz <ktietz@redhat.com>
1842
1843 PR target/57848
1844 * c-decl.c (c_builtin_function_ext_scope): Remove
1845 wrong assumption that it is never called on prexisting
1846 symbol.
1847
0af94e6f
JR
18482013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1849
1850 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1851
20059c8b
GDR
18522013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1853
1854 * c-objc-common.c (c_tree_printer): Tidy.
1855
de5a5fa1
MP
18562013-08-30 Marek Polacek <polacek@redhat.com>
1857
1858 * c-typeck.c (build_binary_op): Add division by zero and shift
1859 instrumentation.
1860
2531a1d9 18612013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1862 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1863
6e2bcc98 1864 PR c/35649
2531a1d9
JR
1865 * c-typeck.c (c_common_type): Prefer double_type_node over
1866 other REAL_TYPE types with the same precision.
1867 (convert_arguments): Likewise.
1868
025311c4
GDR
18692013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1870
1871 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1872 (c_initialize_diagnostics): Call a destructor for the early printer.
1873
da6ca2b5
GDR
18742013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1875
1876 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1877 printer initialization.
1878
318cda85 18792013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1880
318cda85
BI
1881 PR c/57490
1882 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1883 check for truth values.
1884 (expand_array_notation_exprs): Added truth values case. Removed an
1885 unwanted else. Added for-loop to walk through subtrees in default
1886 case.
1887
b066401f
GDR
18882013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1889
1890 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1891
fb48aadc
JM
18922013-07-23 Joseph Myers <joseph@codesourcery.com>
1893
1894 * c-parser.c (struct c_generic_association): Fix typo.
1895
433cc7b0
TT
18962013-07-23 Tom Tromey <tromey@redhat.com>
1897 Joseph Myers <joseph@codesourcery.com>
1898
1899 * c-parser.c (struct c_generic_association): New.
1900 (c_generic_association_d): New typedef.
1901 (c_parser_generic_selection): New function.
1902 (c_parser_postfix_expression): Handle RID_GENERIC.
1903
26d40c3d
JM
19042013-07-13 Jason Merrill <jason@redhat.com>
1905
1906 PR c++/57793
1907 * c-decl.c (finish_struct): Check for too-large class.
1908
ecdbd01a 19092013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1910
1911 PR c/57821
1912 * c-typeck.c (set_init_index): When folding, check for index overflow.
1913
1141ed3f
BI
19142013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1915
1916 * c-parser.c (c_parser_array_notation): Removed rejection of array
1917 notations in an array of function pointers.
1918
713b46fa
BI
19192013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1920
1921 * c-array-notation.c (make_triplet_val_inv): New function.
1922 (create_cmp_incr): Likewise.
1923 (create_array_refs): Likewise.
1924 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1925 Also modularized common parts between functions and called the function.
1926 (build_array_notation_expr): Likewise.
1927 (fix_conditional_array_notations_1): Likewise.
1928 (fix_array_notation_expr): Likewise.
1929 (fix_array_notation_call_expr): Likewise.
1930
92f20202
MP
19312013-06-18 Marek Polacek <polacek@redhat.com>
1932
1933 PR c/57630
1934 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1935
73a23b06
BI
19362013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1937
1938 * c-array-notation.c (build_array_notation_expr): Reject array notation
1939 mismatch between LHS and RHS even inside a call_expr. Also, removed
1940 a couple while statements that were dead code.
1941
00b8517d
BI
19422013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1943
1944 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1945 excessive precision expressions in function parameters. Also removed
1946 couple unwanted while statements.
1947
1509bdda
BI
19482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1949
1950 * c-array-notation.c (expand_array_notation_exprs): Added
1951 ARRAY_NOTATION_REF case.
1952
d60f1706
BI
19532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1954
1955 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1956 function to c-family/array-notation-common.c.
1957 (is_cilkplus_reduce_builtin): Likewise.
1958 (find_rank): Likewise.
1959 (extract_array_notation_exprs): Likewise.
1960 (replace_array_notations): Likewise.
1961 (find_inv_trees): Likewise.
1962 (replace_inv_trees): Likewise.
1963 (contains_array_notation_expr): Likewise.
1964 (find_correct_array_notation_type): Likewise.
1965 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1966 (struct inv_list): Moved this to c-family/array-notation-common.c.
1967 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1968
6d6efbb3
BI
19692013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1970
1971 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1972 reduction functions outside the for-loop. Added a check if the fundecl
1973 is non-NULL. Finally, removed an unwanted if-statement, and made the
1974 body unconditional.
1975
25c22937
BI
19762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1977
1978 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1979 condition of the if-statement matches the rank of else-block and then-
1980 block when array notations are used.
1981 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1982 expression after the entire function body is parsed.
1983 (c_parser_expr_no_commas): Delayed creating array notation expressions
1984 to the end of function parsing.
1985 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1986 whole if-statement instead of just the condition.
1987 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1988
edd25645
BI
19892013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1990
1991 PR c/57474
1992 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1993 array to NULL_TREE if they are unused. Also added a check for the
1994 field to be NULL before its fields are used in future.
1995
065ce7f1
RO
19962013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1997
1998 PR bootstrap/57450
1999 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2000 (build_array_notation_expr): Likewise.
2001
36536d79
BI
20022013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2003
2004 * c-typeck.c (build_array_ref): Added a check to see if array's
2005 index is greater than one. If true, then emit an error.
2006 (build_function_call_vec): Exclude error reporting and checking
2007 for builtin array-notation functions.
2008 (convert_arguments): Likewise.
2009 (c_finish_return): Added a check for array notations as a return
2010 expression. If true, then emit an error.
2011 (c_finish_loop): Added a check for array notations in a loop
2012 condition. If true then emit an error.
2013 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2014 (build_binary_op): Added a check for array notation expr inside
2015 op1 and op0. If present, we call another function to find correct
2016 type.
2017 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2018 * c-parser.c (c_parser_compound_statement): Check if array
2019 notation code is used in tree, if so, then transform them into
2020 appropriate C code.
2021 (c_parser_expr_no_commas): Check if array notation is used in LHS
2022 or RHS, if so, then build array notation expression instead of
2023 regular modify.
2024 (c_parser_postfix_expression_after_primary): Added a check for
2025 colon(s) after square braces, if so then handle it like an array
2026 notation. Also, break up array notations in unary op if found.
2027 (c_parser_direct_declarator_inner): Added a check for array
2028 notation.
2029 (c_parser_compound_statement): Added a check for array notation in
2030 a stmt. If one is present, then expand array notation expr.
2031 (c_parser_if_statement): Likewise.
2032 (c_parser_switch_statement): Added a check for array notations in
2033 a switch statement's condition. If true, then output an error.
2034 (c_parser_while_statement): Similarly, but for a while.
2035 (c_parser_do_statement): Similarly, but for a do-while.
2036 (c_parser_for_statement): Similarly, but for a for-loop.
2037 (c_parser_unary_expression): Check if array notation is used in a
2038 pre-increment or pre-decrement expression. If true, then expand
2039 them.
2040 (c_parser_array_notation): New function.
2041 * c-array-notation.c: New file.
2042 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2043
cd192ccc
MS
20442013-05-23 Mike Stump <mikestump@comcast.net>
2045
2046 * c-typeck.c (convert_for_assignment): Handle references to memory
2047 spaces better.
2048
427b248d
JM
20492013-05-16 Jason Merrill <jason@redhat.com>
2050
2051 * Make-lang.in (cc1$(exeext)): Use link mutex.
2052
44d90fe1
PC
20532013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2054
2055 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2056 to simply use OPT_Wpointer_arith.
2057 (build_unary_op): Likewise.
2058
4e7d7b3d
JJ
20592013-04-03 Jakub Jelinek <jakub@redhat.com>
2060
2061 PR c/19449
2062 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2063 argument. If set, or it temporarily for parsing of the first
2064 argument into force_folding_builtin_constant_p.
2065 (c_parser_postfix_expression): Adjust callers.
2066
839b422f
RB
20672013-03-21 Richard Biener <rguenther@suse.de>
2068
2069 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2070 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2071
2ee028f1
MP
20722013-02-12 Marek Polacek <polacek@redhat.com>
2073
2074 PR c/44938
2075 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2076 origtypes to NULL.
2077
8824edff
JJ
20782013-01-24 Jakub Jelinek <jakub@redhat.com>
2079
2080 PR c/56078
2081 * c-typeck.c (set_nonincremental_init_from_string): If
2082 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2083 returned false.
2084 (process_init_element): Likewise.
2085
eadd3d0d
JJ
20862012-12-20 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c++/55619
2089 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2090 argument, don't call default_function_array_conversion
2091 nor c_fully_fold here.
2092 (c_parser_asm_statement): Adjust callers.
2093 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2094 and outputs here, and call default_function_array_conversion
2095 on inputs that don't need to be addressable.
2096
f8a93a2e
JJ
20972012-12-18 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR c/39464
2100 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2101 warning require that both c_common_unsigned_type as well as
2102 c_common_signed_type is the same for both mvl and mvr types.
2103
9771b263
DN
21042012-11-16 Diego Novillo <dnovillo@google.com>
2105
2106 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2107
2108 * c-common.c: Use new vec API in vec.h.
2109 * c-common.h: Likewise.
2110 * c-gimplify.c: Likewise.
2111 * c-pragma.c: Likewise.
2112 * c-pretty-print.c: Likewise.
2113 * c-pretty-print.h: Likewise.
2114 * c-semantics.c: Likewise.
2115 * c-decl.c: Likewise.
2116 * c-parser.c: Likewise.
2117 * c-tree.h: Likewise.
2118 * c-typeck.c: Likewise.
2119
880661a4
JW
21202012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2121
2122 PR c++/54930
2123 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2124
077d1abe
MLI
21252012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2126
2127 PR c/53066
2128 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2129 shadows a function, unless the variable is a function or a
2130 pointer-to-function.
2131
3a785c97
JJ
21322012-10-12 Jakub Jelinek <jakub@redhat.com>
2133
2134 PR c/54381
2135 * c-parser.c (struct c_tree_loc_pair): Removed.
2136 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2137 add location_t * and tree * arguments, fill in array of 3
2138 sizeof_arg trees and corresponding locs.
2139 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2140 c_parser_expr_list callers.
2141 (c_parser_postfix_expression_after_primary): Likewise. Pass
2142 array of 3 sizeof_arg trees and locs (corresponding to first
2143 3 arguments) to sizeof_pointer_memaccess_warning.
2144
703c8606
LC
21452012-10-09 Lawrence Crowl <crowl@google.com>
2146
2147 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2148 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2149 hash table.
2150
5d9de0d0
PC
21512012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2152
2153 PR c++/54194
2154 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2155 call.
2156
a212e43f
MG
21572012-10-09 Marc Glisse <marc.glisse@inria.fr>
2158
2159 PR c++/54427
2160 * c-typeck.c: Include c-common.h.
2161 (enum stv_conv): Moved to c-common.h.
2162 (scalar_to_vector): Moved to c-common.c.
2163 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2164 * Make-lang.in: c-typeck.c depends on c-common.h.
2165
3b78de56
AC
21662012-10-04 Arnaud Charlet <charlet@adacore.com>
2167
2168 * c-decl.c (c_write_global_declarations): Fix handling of
2169 -fdump-ada-spec*.
2170
78c60e3d
SS
21712012-09-30 Sharad Singhai <singhai@google.com>
2172
2173 * c-decl.c (c_write_global_declarations): Use a different method
2174 to determine if the dump has ben initialized.
2175
9f33203d
JM
21762012-09-14 Joseph Myers <joseph@codesourcery.com>
2177
2178 PR c/54552
2179 * c-typeck.c (c_cast_expr): When casting to a type requiring
2180 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2181 c_fully_fold first.
2182
a27d595d
JM
21832012-09-14 Joseph Myers <joseph@codesourcery.com>
2184
2185 PR c/54103
2186 * c-typeck.c (build_unary_op): Pass original argument of
2187 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2188 any C_MAYBE_CONST_EXPR, if it has integer operands.
2189 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2190 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2191 to c_objc_common_truthvalue_conversion, then remove any
2192 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2193 c_objc_common_truthvalue_conversion not
2194 c_common_truthvalue_conversion.
2195 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2196 call note_integer_operands for arguments with integer operands
2197 that are not integer constants.
2198
9feb29df
JJ
21992012-09-13 Jakub Jelinek <jakub@redhat.com>
2200
2201 PR c/54559
2202 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2203 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2204
d409320c
JJ
22052012-08-31 Jakub Jelinek <jakub@redhat.com>
2206
2207 PR c/54428
2208 * c-convert.c (convert): Don't call fold_convert_loc if
2209 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2210 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2211 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2212
6265d07c
JJ
22132012-08-24 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR c/54355
2216 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2217 for nested and empty_ok arguments in the call to
2218 c_parser_declaration_or_fndef.
2219
1a4049e7
JJ
22202012-08-17 Jakub Jelinek <jakub@redhat.com>
2221
2222 * c-tree.h (c_last_sizeof_arg): Declare.
2223 * c-parser.c (struct c_tree_loc_pair): New type.
2224 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2225 non-NULL.
2226 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2227 (c_parser_postfix_expression_after_primary): Likewise. Call
2228 sizeof_pointer_memaccess_warning if needed.
2229 (sizeof_ptr_memacc_comptypes): New function.
2230 * c-typeck.c (c_last_sizeof_arg): New global variable.
2231 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2232
0229aee9
UB
22332012-07-24 Uros Bizjak <ubizjak@gmail.com>
2234
2235 * c-lang.h (lang_decl): Add variable_size GTY option.
2236
7ee2468b
SB
22372012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2238
2239 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2240 * Make-lang.in: Fix dependencies.
2241
d4a10d0a
SB
22422012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2243
2244 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2245 and add language Makefile hooks.
2246 * config-lang.in: New file.
2247 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2248 add the required "normal" config-lang.in rules.
2249 * c-lang.h: Moved from gcc/ to here.
2250 * c-tree.h: Likewise.
2251 * c-objc-common.c: Likewise.
2252 * c-objc-common.h: Likewise.
2253 * c-typeck.c: Likewise.
2254 * c-convert.c: Likewise.
2255 * c-lang.c: Likewise.
2256 * c-aux-info.c: Likewise.
2257 * c-errors.c: Likewise.
2258 * gccspec.c: Likewise.
2259 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2260 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2261\f
5624e564 2262Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2263
2264Copying and distribution of this file, with or without modification,
2265are permitted in any medium without royalty provided the copyright
2266notice and this notice are preserved.